package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.SmSign;

/**
 * 短信签名管理 DTO 对象
 * @author wuluodan
 *
 */
public class SmSignDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	private String recId;

	@ColToProperty
	@TabCol(Index = 2, title = "前后缀类型", width = "65")
	private String signPosStr;
	
	@ColToProperty
	@TabCol(Index = 3, title = "业务端名称", width = "90")
	private String svrNodeName;
	
	private String srvNode;
	
	@ColToProperty
	@TabCol(Index = 4, title = "短信类型名称", width = "90")
	private String serviceName;
	
	private String serviceCode;
	
	@ColToProperty
	@TabCol(Index = 5, title = "前后缀内容", width = "100")
	private String signContent;
	
	private String status;
	
	@ColToProperty
	@TabCol(Index = 6, title = "状态", width = "")
	private String statusStr;
	
	@ColToProperty
	@TabCol(Index = 7, title = "说明", width = "150")
	private String desc;
	
	private String signPos;

	public SmSignDTO() {}
	
	public SmSignDTO(SmSign entity) {
		this.setRecId(entity.getRecId());
		this.setSrvNode(entity.getSrvNode());
		this.setServiceCode(entity.getServiceCode());
		this.setSignContent(entity.getSignContent());
		this.setStatus(entity.getStatus());
		this.setDesc(entity.getDesc());
		this.setSignPos(entity.getSignPos());
	}
	
	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getRecId() {
		return recId;
	}

	public void setRecId(String recId) {
		this.recId = recId;
	}

	public String getSignPosStr() {
		if (null == this.signPos) {
			return "未知";
		}
		if (this.signPos.equals("0")) {
			return "前缀";
		}
		if (this.signPos.equals("1")) {
			return "后缀";
		}
		return "未知";
	}

	public void setSignPosStr(String signPosStr) {
		this.signPosStr = signPosStr;
	}

	public String getSvrNodeName() {
		return svrNodeName;
	}

	public void setSvrNodeName(String svrNodeName) {
		this.svrNodeName = svrNodeName;
	}

	public String getSrvNode() {
		return srvNode;
	}

	public void setSrvNode(String srvNode) {
		this.srvNode = srvNode;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getSignContent() {
		return signContent;
	}

	public void setSignContent(String signContent) {
		this.signContent = signContent;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getSignPos() {
		return signPos;
	}

	public void setSignPos(String signPos) {
		this.signPos = signPos;
	}
	
}
